// ===============================================
// app_user_info
//
// Create by Will on 8/3/2024 16:46
// Copyright @polynesia.All rights reserved.
// ===============================================

import 'package:json_annotation/json_annotation.dart';

/// This allows the `LoginUser` class to access private members in
/// the generated file. The value for this is *.g.dart, where
/// the star denotes the source file name.
part 'login_user.g.dart';

@JsonSerializable(genericArgumentFactories: true)
class LoginUser {
  const LoginUser({
    this.id,
    this.username,
    this.email,
    this.phone,
    this.countryCode,
    this.avatar,
    this.disabled,
    this.inviteCode,
    this.titles,
  });

  factory LoginUser.fromJson(Map<String, dynamic> json) => _$LoginUserFromJson(json);

  final int? id;
  final String? username;
  final String? email;
  final int? phone;
  @JsonKey(name: 'country_code')
  final String? countryCode;
  final String? avatar;
  final bool? disabled;
  @JsonKey(name: 'invite_code')
  final String? inviteCode;
  final List<String>? titles;

  Map<String?, dynamic> toJson() => _$LoginUserToJson(this);
}
